*********************************** FOLDERS ************************************

* Define the main project path (currently an empty string, make sure to set this correctly)
global project ""

* Define paths for different data and output folders using the project path
global nomenclature "$project\Data\nomenclature\"         // Path for nomenclature data
global input_r "$project\Data\input_r\"                   // Path for R input files
global output_r "$project\Data\output_r\"                 // Path for R output files
global input_stata "$project\Data\input_stata\"           // Path for Stata input files
global output_stata "$project\Data\output_stata\"         // Path for Stata output files
global codes "$project\codes\"        					  // Path for do files
global export "$project\tables\"                          // Path for export tables

* Set paths for additional Stata ado packages
net set ado "$project\Data\packagesstata"
sysdir set PLUS "$project\Data\packagesstata"

****************************** RUN CODES **************************************

* Execute a series of .do files in the specified order

****************** MAIN TEXT ****************************

do "$codes/0a_Listed_Companies.do"                        // Processes data on listed companies
do "$codes/0b_Traitement_Pole_Emploi.do"                  // Processes Pole Emploi data
do "$codes/0c_Table_input_ouput.do"                       // Creates input-output tables
do "$codes/0d_Nomenclatures.do"                           // Processes nomenclature data
do "$codes/1a_Pre_Regressions_main.do"                    // Prepares data for main regressions
do "$codes/1b_Regressions_main.do"                        // Runs main regression analyses
														  // Table 3, Table B3
do "$codes/1c_Regressions_interactions.do"                // Analyzes interaction effects
														  // Table 10, Table B9, Table B10
do "$codes/1d_Regressions_CDD_CDI.do"                     // Runs regressions on temp. and permanent contracts
														  // Table 7b
do "$codes/1e_Regressions_LLM_tightness.do"               // Analyzes regressions on LLM tightness
														  // Table 7a
do "$codes/1f_Regressions_orgcap.do"                      // Runs regressions on organizational capital
														  // Table 8
do "$codes/2a_Bartik_preparation.do"                      // Prepares data for Bartik analysis
do "$codes/2b_Bartik_regressions.do"                      // Performs Bartik regressions
														  // Table 4
do "$codes/3a_Performance_preparation.do"                 // Prepares data for performance analysis
do "$codes/3b_Performance_graphs.do"                      // Generates performance graphs
														  // Figures above Table 5 and Table 11
do "$codes/3c_Performance_regressions.do"                 // Conducts performance regressions
														  // Table 5, Table 6, Table 9, Table 11, Table 12
do "$codes/4_Stat_Desc_revision.do"                       // Revises statistical descriptions
														  // Table 1, Table 2

****************** APPENDIX ******************************

do "$codes/A0_Regressions_selection.do"                   // Performs rtests of selection
														  // Table B13
do "$codes/A1_Bartik_as_good_as_randomly_assigned.do"      // Tests Bartik instrument validity
														   // Table B7
do "$codes/A2_Build_Buy_agg.do"                            // Regressions with aggregate 'build vs buy' data
														   // Table B4
do "$codes/A3a_Pre_Regressions_extensive.do"               // Prepares data for extensive margin regressions
do "$codes/A3b_Regressions_extensive.do"                   // Runs regressions at extensive margin
														   // Table B12
do "$codes/A4a_Asset_Sales_list_siren.do"                  // Processes asset sales using Siren numbers
do "$codes/A4b_Asset_Sales_creation.do"                    // Creates dataset for asset sales
do "$codes/A4c_Asset_Sales_successeurs.do"                 // Processes successors in asset sales
do "$codes/A4d_Asset_Sales_merge.do"                       // Merges asset sales data
do "$codes/A4e_Asset_Sales_integration.do"                 // Integrates asset sales data
do "$codes/A4f_Asset_Sales_regressions.do"                 // Runs regressions on asset sales
														   // Table B6
do "$codes/A5a_Alternative_measures_Pre_Regressions.do"    // Prepares alternative measures for regressions
do "$codes/A5b_Alternative_measures_Regressions.do"        // Runs regressions with alternative measures of HC
														   // Table B2
do "$codes/A5c_Appendix_nonHC_measures_preparation.do"     // Prepares non-HC measures for appendix
do "$codes/A5d_Appendix_nonHC_measures_regressions.do"     // Runs regressions on non-HC measures
														   // Table B9, Table B11
do "$codes/A6a_Maps.do"                                    // Creates LLM maps
do "$codes/A6b_Siren_Choice.do"                            // Analyzes subsidiary choice choice
														   // Table B5
do "$codes/A6c_Path_dependency.do"                         // Analyzes path dependency
														   // Table B14
do "$codes/A6d_Interaction_size.do"                        // Analyzes interaction effects by size
														   // Table B8